Package com.eforce.compIII

Source Code of com.eforce.compIII.InputExample

package com.eforce.compIII;


/**
* This file contains all the constants that will be used in the application.
* @author ABiswas
*
*/

import java.io.*;
import java.util.Scanner;
public class InputExample {
public static void main(String args[ ]) throws IOException {
Scanner s = new Scanner(System.in);
System.out.print("Enter your height in centimeters: ");
float height = s.nextFloat();
System.out.print("Enter your weight in kilograms: ");
float weight = s.nextFloat();
float bmi = weight/(height*height)*10000;
System.out.println("Your body mass index is " + bmi + ".");
}
}
TOP

Related Classes of com.eforce.compIII.InputExample

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.